package cn.proxy;

import cn.proxy.domain.Student;
import cn.proxy.proxy.ProxyStudent;
import cn.proxy.service.IStudentService;
import cn.proxy.service.impl.StudentServiceImpl;
import cn.proxy.transaction.DaoTransaction;
import org.junit.Test;

/**
 * @author 董代恒
 * @version 1.0
 */
public class TestStudent {

    @Test
    public void testSava(){
        DaoTransaction transaction = new DaoTransaction();
        StudentServiceImpl studentService = new StudentServiceImpl();
        ProxyStudent proxyStudent=new ProxyStudent(studentService,transaction);

        proxyStudent.save(new Student());

        proxyStudent.query(1L);
    }
}
